import sqlite3

def iuGetpp(ip,user,name):
    conn = sqlite3.connect('../main/sqlite3/ssh.db')
    c = conn.cursor()
    name = name.__str__()
    # print(name)
    result = c.execute("select PASSWD,PORT from ssh where IP = " + "'" + ip + "'" + "and USER = " + "'" + user + "'" + " and NAME = " + "'" + name + "'" + ";")
    for row in result:
        passwd = row[0]
        port = row[1]
    conn.commit()
    conn.close()
    return passwd,port